To solve the problems in face editing, such as unnatural editing results and great changes in generated images, a controllable face editing algorithm with closed-form solution was proposed. Firstly, n latent vectors were sampled randomly to construct a sample matrix, and the top k principal component vectors of the matrix were calculated. Then, five attributes of face image were obtained by ResNet-50, and the semantic boundary of each attribute was calculated by Support Vector Machine (SVM). Finally, the interpretable direction vectors of these attributes were calculated, which were as closed to the principal components vectors as possible and stayed as far away from the semantic boundary of the corresponding attribute as possible at the same time, thereby reducing the coupling between facial attributes, and improving the controllability in face editing. Because the algorithm has a closed-form solution, it has high efficiency. Experimental results show that the compared with closed-form Factorization of latent Semantics in GANs (SeFa) algorithm and Discovering Interpretable Generative Adversarial Network Controls (GANSpace) algorithm, the proposed algorithm increases the Inception Score (IS) by 19% and 26% respectively, decreases the Fréchet Inception Distance (FID) by 4% and 37% respectively, and decreases the Maximum Mean Discrepancy (MMD) by 15% and 48% respectively. It can be seen that this algorithm has good controllability and decoupling.